home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCIncludes / locale.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-18  |  1.5 KB  |  76 lines  |  [TEXT/MMCC]

  1. /* locale.h standard header */
  2. #ifndef _LOCALE
  3. #define _LOCALE
  4. #ifndef _YVALS
  5. #include <yvals.h>
  6. #endif
  7.  
  8. #if __MWERKS__
  9. #pragma options align=mac68k
  10. #endif
  11.  
  12.         /* macros */
  13. #ifndef NULL
  14. #define NULL    _NULL
  15. #endif
  16.         /* locale codes */
  17. #define LC_COLLATE    (1 << 0)
  18. #define LC_CTYPE    (1 << 1)
  19. #define LC_MONETARY    (1 << 2)
  20. #define LC_NUMERIC    (1 << 3)
  21. #define LC_TIME        (1 << 4)
  22. #define LC_MESSAGE    (1 << 5)
  23.     /* ADD YOURS HERE, THEN UPDATE _NCAT */
  24. #define _NCAT        6    /* one more than last */
  25. #define LC_ALL        ((1 << _NCAT) - 1)
  26.         /* type definitions */
  27. struct lconv {
  28.         /* controlled by LC_MONETARY */
  29.     char *currency_symbol;
  30.     char *int_curr_symbol;
  31.     char *mon_decimal_point;
  32.     char *mon_grouping;
  33.     char *mon_thousands_sep;
  34.     char *negative_sign;
  35.     char *positive_sign;
  36.     char frac_digits;
  37.     char int_frac_digits;
  38.     char n_cs_precedes;
  39.     char n_sep_by_space;
  40.     char n_sign_posn;
  41.     char p_cs_precedes;
  42.     char p_sep_by_space;
  43.     char p_sign_posn;
  44.         /* controlled by LC_NUMERIC */
  45.     char *decimal_point;
  46.     char *grouping;
  47.     char *thousands_sep;
  48.     char *_Frac_grouping;
  49.     char *_Frac_sep;
  50.         /* controlled by LC_MESSAGE */
  51.     char *_No;
  52.     char *_Yes;
  53.     };
  54.         /* declarations */
  55. _C_LIB_DECL
  56. struct lconv *localeconv(void);
  57. char *setlocale(int, const char *);
  58. extern struct lconv _Locale;
  59. _END_C_LIB_DECL
  60. #ifndef __cplusplus
  61.         /* macro overrides */
  62. #define localeconv()    (&_Locale)
  63. #endif /* __cplusplus */
  64.  
  65. #if __MWERKS__
  66. #pragma options align=reset
  67. #endif
  68.  
  69. #endif /* _LOCALE */
  70.  
  71. /*
  72.  * Copyright (c) 1994 by P.J. Plauger.  ALL RIGHTS RESERVED. 
  73.  * Consult your license regarding permissions and restrictions.
  74.  */
  75.  
  76.